package cn.lijiajia3515.cairo.captcha.code;

import cn.lijiajia3515.cairo.captcha.Captcha;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.time.Duration;

/**
 * code 验证码
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder(toBuilder = true)
public class CodeCaptcha implements Captcha {

	/**
	 * 标识
	 */
	private String id;

	/**
	 * 详情
	 */
	private String detail;

	/**
	 * 验证码
	 */
	private String code;

	/**
	 * 过期时间
	 */
	private Duration expire;

	@Override
	public String getId() {
		return id;
	}

	@Override
	public String getDetail() {
		return detail;
	}

	@Override
	public String getCode() {
		return code;
	}

	@Override
	public Duration getExpire() {
		return expire;
	}
}
